<template>
  <div>
    <el-row type="flex" justify="center" align="middle" style="margin-top:100px;">

      <el-card class="box-card">
        <el-form :rules="rules" label-position="left" :model="loginForm"
           label-width="0px" v-loading="loading">
          <h3>系统登录</h3>
          <el-form-item prop="username">
            <el-input type="text" v-model="loginForm.username"
                      auto-complete="off" placeholder="账号"></el-input>
          </el-form-item>
          <el-form-item prop="password">
            <el-input type="password" v-model="loginForm.password"
                      auto-complete="off" placeholder="密码"></el-input>
          </el-form-item>
          <el-form-item>
            <el-checkbox class="login_remember" v-model="checked"
                      label-position="left">记住密码</el-checkbox>
          </el-form-item>
          <el-form-item style="width: 100%">
            <el-button type="primary" style="width: 100%" @click="submitClick">登录</el-button>
          </el-form-item>
        </el-form>
      </el-card>

    </el-row>
  </div>
</template>
<script>
export default {
  data () {
    return {
      rules: {
        username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
        password: [{ required: true, message: '请输入密码', trigger: 'blur' }]
      },
      checked: true,
      loginForm: {
        username: 'admin',
        password: '123'
      },
      loading: false
    }
  },
  methods: {
    submitClick: function () {
      this.loading = true
    }
  }
}
</script>
<style>
.box-card {
    width: 480px;
    height: 400px;
  }
</style>
